package cn.wsalix.admin.entity;

import javax.persistence.Entity;
import javax.persistence.EntityListeners;
import javax.persistence.Table;

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

import cn.anlaser.entity.RelatedEntity;

@Entity
@DynamicInsert
@DynamicUpdate
@Table(name = "ADMIN_ROLE_PERMIT")
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
@EntityListeners({ AuditingEntityListener.class })
@Data
@EqualsAndHashCode(callSuper = false, exclude = { })
@ToString(exclude = { })
public class RolePermit extends RelatedEntity<SysRole, Permit> {
	private static final long serialVersionUID = 9027885954610744145L;

	private String code;//
/*	@ManyToOne(cascade = CascadeType.MERGE, optional = true, fetch = FetchType.LAZY)
	@JoinColumn(name = "ROLE_ID")
	private SysRole role;//

	@ManyToOne(cascade = CascadeType.MERGE, optional = true, fetch = FetchType.LAZY)
	@JoinColumn(name = "PERMIT_ID")
	private Permit permit;//
*/
	

}
